#ifndef LAYER_MANAGER_PRIVATE_H
#define LAYER_MANAGER_PRIVATE_H
#include <qobject.h>
#include <qmap.h>
#include "LayerManager.h"
#include "script/ScriptHelper.h"

class LayerManagerPrivate : public QObject,public LayerManager,public ScriptHelper
{
	Q_OBJECT
public:
	LayerManagerPrivate(QObject* parent = nullptr);
	~LayerManagerPrivate();

	QString getModule()const { return "LayerManager"; }
	LayerManagerPrivate* getPrivateClass() { return this; }
public:
	void addShapeLayer(const QString& layName,const QString& layFile,const QString& styleName);

	QStringList getLayerNameList()const { return layMap.keys(); }
	ILayer* getLayerListByName(const QString& layName)const;
	QList<osgEarth::Layer*> getOsgLayerListByName(const QString& layName)const;
	void removeLayer(const QString& layName);

	bool addShapeLayer(const QStringList& argument,QString* error = nullptr);
	bool removeLayer(const QStringList& argument,QString* error = nullptr);
private:
	QMap<QString,QList<osgEarth::Layer*>> layMap;
};

#endif
